<!--ckfinder upload-->
                                  <script type="text/javascript">
                                  function BrowseServer1()                        {
                                    	var finder = new CKFinder();
                                    	finder.basePath = '../';	// The path for the installation of CKFinder (default = "/ckfinder/").
                                    	finder.selectActionFunction = SetFileField1;
                                    	finder.popup();                                
                                    	// It can also be done in a single line, calling the "static"
                                    	// popup( basePath, width, height, selectFunction ) function:
                                    	// CKFinder.popup( '../', null, null, SetFileField ) ;
                                    	//
                                    	// The "popup" function can also accept an object as the only argument.
                                    	// CKFinder.popup( { basePath : '../', selectActionFunction : SetFileField } ) ;
                                    }
                                    
                                    // This is a sample function which is called when a file is selected in CKFinder.
                                    function SetFileField1( fileUrl )
                                    {
                                    	document.getElementById( 'xFilePath1' ).value = fileUrl;
                                    }
                                    
                                    	</script>
                                        
                                 <!--ckfinder-->  
                                 <script>
                                    $(document).ready(function(){
                                        $('.details-tabs:not(:first)').hide();
                                        $('.tab-navi li').click(function(){
                                            $('.tab-navi li').removeClass('active-tabs');
                                            $(this).addClass('active-tabs');
                                            $('.details-tabs').hide();
                                            var tabSactive=$(this).find('a').attr('href');
                                            $(tabSactive).show();
                                            return false;
                                        });
                                    });
                                    </script>
<!-- sua bai viet-->
<?php echo validation_errors(); ?>

<form method="POST" action="<?php echo base_url().'admin/xuly/setting/list/'.$this->uri->segment(5);?>">
<div class="box_heading">
    <div class="icon">
    <img src="<?php echo base_url().'skin/admin/images/icon_settings.png';?>"/> Sửa Tin tức ( <span style="color: red;"> * : không được để trống</span> )  <?php if(!empty($thongbao)){echo '<img src='.base_url().'skin/admin/images/ok.png class="ok"><font color=red><b>'.$thongbao.'</b></font>';}?>
    </div>
    <div class="right">    
    <a href="<?php echo base_url().'admin/xuly/setting';?>">Hủy</a>
    </div>
</div>

<div class="box_noidung">
<table class="form">
<tr><td><font color=red>* </font>Tiêu đề</td><td><input type="text" size="40" value="<?php if(!empty($data)){echo $data->title;};?>" name="title"/></td></tr>
<tr><td>Địa chỉ website</td><td><input type="text" size="40" value="<?php if(!empty($data)){echo $data->url;};?>" name="url"/></td></tr>
<tr><td>Chủ quản</td><td><input type="text" size="40" value="<?php if(!empty($data)){echo $data->master;};?>" name="master"/></td></tr>
<tr><td>Địa chỉ</td><td><input type="text" size="40" value="<?php if(!empty($data)){echo $data->address;};?>" name="address"/></td></tr>
<tr><td>Email</td><td><input type="text" size="40" value="<?php if(!empty($data)){echo $data->email;};?>" name="email"/></td></tr>
<tr><td>Điện thoại</td><td><input type="text" size="40" value="<?php if(!empty($data)){echo $data->phone;};?>" name="phone"/></td></tr>
<tr><td>Fax</td><td><input type="text" size="40" value="<?php if(!empty($data)){echo $data->fax;};?>" name="fax"/></td></tr>
<tr><td>googlemap</td><td>
<textarea rows="10" cols="45" style="width: 100%;" id="soanthao1" name="googlemap"><?php if(!empty($data)){echo $data->googlemap;};?></textarea>  
<tr><td></font>Meta Description</td><td><textarea rows="2" cols="40" name="metades"><?php if(!empty($data)){echo $data->metades;};?></textarea></td></tr>
<tr><td></font>Meta Keywords</td><td><textarea rows="2" cols="40" name="metakey"><?php if(!empty($data)){echo $data->metakey;};?></textarea></td></tr>
<tr><td></font>Google analytics</td><td><textarea rows="2" cols="40" name="google"><?php if(!empty($data)){echo $data->google;};?></textarea></td></tr>
<tr><td>Logo</td><td>
<input type="text" id="xFilePath" name="logo"  size="53" class="medium" value="<?php if(!empty($data)){echo $data->logo;} ?>" />
<input type="button" value="Tải ảnh lên" onclick="BrowseServer();" style="background-color: #E5E3E3;background-image: url('../../resources/images/button.png');" />
</td></tr>
<tr><td>Banner</td><td>
<input type="text" id="xFilePath1" name="banner"  size="53" class="medium" value="<?php if(!empty($data)){echo $data->banner;} ?>" />
<input type="button" value="Tải ảnh lên" onclick="BrowseServer1();" style="background-color: #E5E3E3;background-image: url('../../resources/images/button.png');" />
</td>
</tr>
<tr>
                <td><font color=red>* </font>Nội dung</td>
                <td>
                     <div class="main-tab">
                        <ul class="tab-navi">
                            <li class="active-tabs"><a href="#details" class=" navi1">Nội dung cuối trang</a></li>
                        </ul>
                        <div id="details" class="details-tabs clearfix">
                          <textarea rows="10" cols="45" style="width: 100%;" id="soanthao" name="footer"><?php echo empty($data)?'':$data->footer; ?></textarea>  
                        </div>
                    </div>
                </td>
            </tr>
             <tr><td>Tags</td><td>
                    <textarea rows="10" cols="45" style="width: 100%;" id="soanthao2" name="tags"><?php echo empty($data) ? '' : $data->tags; ?></textarea>  
                </td></tr>
            <tr><td style="text-align: center;" colspan="2"><input class="guidulieu" type="submit" value="Lưu"/></td></tr>
</table>
</div>
</form>
    <script type="text/javascript">
           if ( typeof CKEDITOR == 'undefined' )
            {
            	document.write("khong "
            		 ) ;
            }
            else
            {
            	var editor = CKEDITOR.replace( 'soanthao' );  
                var editor1 = CKEDITOR.replace( 'soanthao1' ); 
                var editor2 = CKEDITOR.replace( 'soanthao2' ); 
                    
                CKFinder.setupCKEditor( editor, '<?php echo base_url();?>ckeditor/ckfinder/' ) ;
                CKFinder.setupCKEditor( editor1, '<?php echo base_url();?>ckeditor/ckfinder/' ) ;
                CKFinder.setupCKEditor( editor2, '<?php echo base_url();?>ckeditor/ckfinder/' ) ;  
                      	
            }
		</script>


<!--end sua bai viet-->